home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
comm2
/
termsorc.lha
/
Extras
/
Source
/
gtlayout-source.lha
/
LT_ShowWindow.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-24
|
1KB
|
72 lines
/* GadTools layout toolkit
**
** Copyright © 1993-1995 by Olaf `Olsen' Barthel
** Freely distributable.
*/
#include "gtlayout_global.h"
VOID LIBENT
LT_ShowWindow(REG(a0) LayoutHandle *handle,REG(a1) BOOL activate)
{
if(handle)
{
struct Window *window;
ULONG flags,mask;
window = handle -> Window;
flags = NULL;
mask = NULL;
WindowToFront(window);
if(activate)
{
// activate the window
ActivateWindow(window);
// wait for the window to become active
flags |= WFLG_WINDOWACTIVE;
mask |= WFLG_WINDOWACTIVE;
}
ScreenToFront(window -> WScreen);
if(!handle -> ResizeView && (handle -> Window -> Flags & (WFLG_HASZOOM | WFLG_ZOOMED)) == (WFLG_HASZOOM | WFLG_ZOOMED))
{
// make the window full-sized
ZipWindow(window);
// wait for the zoom bit to get cleared
flags &= ~WFLG_ZOOMED;
mask |= WFLG_ZOOMED;
}
// wait for the window to change state?
if(mask)
{
WORD i;
// wait for the window to change state
for(i = 0 ; i < 300 ; i++)
{
if((handle -> Window -> Flags & mask) == flags)
break;
else
WaitTOF();
}
}
// make the window visible on the screen by
// scrolling it into view
LTP_MoveToWindow(handle);
}
}